package com.jiayu.wheel.domain;

import lombok.Data;
import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.util.Date;

/**
 * @author Administrator
 */
@Data
public class User implements RowMapper{
    private int id;
    private String name;
    private String code;
    private Date createDate;

    @Override
    public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
        User user = new User();
        user.setId(rs.getInt("id"));
        user.setName(rs.getString("name"));
        user.setCode(rs.getString("code"));
        return user;
    }
}
